<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <p>大家好, 我是XXX{{tag}}</p>
    <p>大家好, msg的内容是{{msg}}</p>
    <p v-text="msg" title="哈哈"></p>
    <p v-html="tag" title="哈哈"></p>
    <p v-aa="msg"></p>
    <input type="text" v-model="car.brand">
    <button v-on:click="handleClick">点我鸭</button>
    <p>{{car.brand}}</p>
    <p v-text="car.color"></p>
  </div>
  <script src="./src/vue.js"></script>
  <script src="./src/compiler.js"></script>
  <script src="./src/observer.js"></script>
  <script src="./src/watcher.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        msg: 'hello vue',
        tag: '<h2>哈哈</h2>',
        car: {
          brand: '大众',
          color: 'yellow'
        }
      },
      methods: {
        handleClick() {
          vm.car.brand = 'hello vue3'
        }
      }
    })
  </script>
</body>
</html>